package com.yonyou.cyxdms.basedata.service.entity.questionaire;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 问题库
 * </p>
 *
 * @author renwd
 * @since 2019-09-19
 */
@TableName("tm_question")
public class QuestionPO extends DMSBasePO<QuestionPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 问题ID
     */
    @TableId(value = "QUESTION_ID", type = IdType.AUTO)
    private Long questionId;

    @TableField("APP_ID")
    private String appId;

    /**
     * 公司代码
     */
    @TableField("COMPANY_CODE")
    private String companyCode;
    /**
     * 所有者代码
     */
    @TableField("OWNER_CODE")
    private String ownerCode;
    /**
     * 所有者的父组织代码（用于二网使用）
     */
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;
    /**
     * 答案组ID
     */
    @TableField("ANSWER_GROUP_ID")
    private Long answerGroupId;
    /**
     * 答案组编码
     */
    @TableField("ANSWER_GROUP_NO")
    private String answerGroupNo;
    /**
     * 问卷编码
     */
    @TableField("QUESTION_CODE")
    private String questionCode;
    /**
     * 问题类型(1571)
     */
    @TableField("QUESTION_TYPE")
    private Integer questionType;
    /**
     * 问题名称
     */
    @TableField("QUESTION_NAME")
    private String questionName;
    /**
     * 问题内容
     */
    @TableField("QUESTION_CONTENT")
    private String questionContent;
    /**
     * 是否必填
     */
    @TableField("IS_MUST_FILLED")
    private Integer isMustFilled;
    /**
     * 是否启用
     */
    @TableField("IS_VALID")
    private Integer isValid;
    /**
     * 数据来源(1045)
     */
    @TableField("DATA_SOURCES")
    private Integer dataSources;
    @TableField("SOURCE_ID")
    private Long sourceId;
    /**
     * 来源日期
     */
    @TableField("SOURCE_CHANGED_AT")
    private LocalDateTime sourceChangedAt;

    public QuestionPO() {
        super();
    }


    public Long getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getOwnerParCode() {
        return ownerParCode;
    }

    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }

    public Long getAnswerGroupId() {
        return answerGroupId;
    }

    public void setAnswerGroupId(Long answerGroupId) {
        this.answerGroupId = answerGroupId;
    }

    public String getAnswerGroupNo() {
        return answerGroupNo;
    }

    public void setAnswerGroupNo(String answerGroupNo) {
        this.answerGroupNo = answerGroupNo;
    }

    public String getQuestionCode() {
        return questionCode;
    }

    public void setQuestionCode(String questionCode) {
        this.questionCode = questionCode;
    }

    public Integer getQuestionType() {
        return questionType;
    }

    public void setQuestionType(Integer questionType) {
        this.questionType = questionType;
    }

    public String getQuestionName() {
        return questionName;
    }

    public void setQuestionName(String questionName) {
        this.questionName = questionName;
    }

    public String getQuestionContent() {
        return questionContent;
    }

    public void setQuestionContent(String questionContent) {
        this.questionContent = questionContent;
    }

    public Integer getIsMustFilled() {
        return isMustFilled;
    }

    public void setIsMustFilled(Integer isMustFilled) {
        this.isMustFilled = isMustFilled;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Integer getDataSources() {
        return dataSources;
    }

    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public Long getSourceId() {
        return sourceId;
    }

    public void setSourceId(Long sourceId) {
        this.sourceId = sourceId;
    }

    public LocalDateTime getSourceChangedAt() {
        return sourceChangedAt;
    }

    public void setSourceChangedAt(LocalDateTime sourceChangedAt) {
        this.sourceChangedAt = sourceChangedAt;
    }

    @Override
    protected Serializable pkVal() {
        return this.questionId;
    }

    @Override
    public String toString() {
        return "QuestionPO{" +
                "questionId=" + questionId +
                ", appId=" + appId +
                ", companyCode=" + companyCode +
                ", ownerCode=" + ownerCode +
                ", ownerParCode=" + ownerParCode +
                ", answerGroupId=" + answerGroupId +
                ", answerGroupNo=" + answerGroupNo +
                ", questionCode=" + questionCode +
                ", questionType=" + questionType +
                ", questionName=" + questionName +
                ", questionContent=" + questionContent +
                ", isMustFilled=" + isMustFilled +
                ", isValid=" + isValid +
                ", dataSources=" + dataSources +
                ", sourceId=" + sourceId +
                ", sourceChangedAt=" + sourceChangedAt +
                "}";
    }

}
